package thinkingJava.chapter12;
class MyException extends Exception {
	public MyException() {}
	public MyException(String msg) {
		super(msg);
	}
}
public class FullConstructors {
	public void f()  throws MyException{
		System.out.println("throw MyException in f()");
		throw new MyException();
	}
	public void g() throws MyException {
		System.out.println("throws MyException with param in g()");
		throw new MyException("this is my Exception");
	}
	public static void main(String[] args) {
		FullConstructors fc =new FullConstructors();
		try {
			fc.f();
		} catch (MyException e) {
			e.printStackTrace(System.out);
		}
		try {
			fc.g();
		} catch (MyException e) {
			e.printStackTrace(System.out);
		}
	}
}
